package com.aike.dao;

import com.aike.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    //注册
    int register(@Param("username") String username, @Param("password") String password, @Param("gender") Integer gender, @Param("classname") String classname);

    //登录
    User login(@Param("username") String username, @Param("password") String password);

    //根据id获取用户
    User getUserById(Integer userId);

    //根据类型获取用户
    List<User> getUserByType(Integer type);

    //更新用户信息
    int updateUserById(@Param("userId") Integer userId, @Param("username") String username, @Param("password") String password, @Param("gender") Integer gender, @Param("classname") String classname, @Param("type") Integer type);

    //根据id删除用户
    int deleteUserById(Integer userId);

}
